let express = require('express');
let path = require('path');
let app  = express();
app.get('/', (req,res) => {
    res.sendFile(path.join(__dirname, 'bridge2.html'));
});
app.get('/user/:id', (req, res) => {
    let id = req.params.id;
    res.json({
        id,
        name:'hello!---' + id,
    })
})
app.listen(8080, _=> {
    console.log('服务器启动成功');
})